package com.yike.order.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 订单信息
 *
 * @author Sakura
 * @since 2024-11-01
 */
@Data
@Accessors(chain = true)
@ApiModel(value = "平台订单详细信息")
public class PlatformOrderInfoVo implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty("id")
    private Long id;

    @ApiModelProperty("订单状态: 0.待付款 1.已付款 2.已失效 3.已退款 6退款中")
    private Integer status;

    @NotBlank(message = "订单编号不能为空")
    @ApiModelProperty("订单编号")
    private String orderNo;

    @ApiModelProperty("支付方式: 1.微信 2.支付宝")
    private Integer payway;

    @ApiModelProperty("支付金额")
    private BigDecimal amount;

    @ApiModelProperty("退款金额")
    private BigDecimal refundAmount;

    @ApiModelProperty("实际金额")
    private BigDecimal actualAmount;

    @ApiModelProperty("设备编号")
    private String macNo;

    @ApiModelProperty("店铺名称")
    private String shopName;

    @ApiModelProperty("店铺编号")
    private String shopNo;

    @ApiModelProperty("省code")
    private String provCode;

    @ApiModelProperty("省名称")
    private String provName;

    @ApiModelProperty("市code")
    private String cityCode;

    @ApiModelProperty("市名称")
    private String cityName;

    @ApiModelProperty("区code")
    private String distCode;

    @ApiModelProperty("区名称")
    private String distName;

    @ApiModelProperty("代理商ID")
    private String agentId;

    @ApiModelProperty("代理商编号")
    private String agentNo;

    @ApiModelProperty("代理商名称")
    private String agentName;

    @ApiModelProperty("支付时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date payTime;

    @ApiModelProperty("订单商品详情")
    List<OrderDetailVo> orderDetailVos;

    @ApiModelProperty("退款订单号")
    List<String> refundNos;

}
